package com.example.red_tea_house.util;

import android.content.Context;
import android.view.View;
import android.widget.Toast;

import com.google.android.material.snackbar.Snackbar;

/*
* 2021.3.26
* ToastUtil是用来展示Toast和Snackbar的工具类
* */
public class ToastUtil {
        public static void showToast(Context context, String msg) {
            Toast.makeText(context, msg, Toast.LENGTH_SHORT).show();
        }

        public static void showSnackBar(View view, String msg) {
            Snackbar.make(view, msg, Snackbar.LENGTH_SHORT).show();
        }
    }

